package com.example.jpush.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author Zml
 * @date 2018/4/13.
 */
public class JPushMessageObj implements Parcelable {

    public String id;
    public String title;
    public String content;
    public String type;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.title);
        dest.writeString(this.content);
        dest.writeString(this.type);
    }

    public JPushMessageObj() {
    }

    protected JPushMessageObj(Parcel in) {
        this.id = in.readString();
        this.title = in.readString();
        this.content = in.readString();
        this.type = in.readString();
    }

    public static final Creator<JPushMessageObj> CREATOR = new Creator<JPushMessageObj>() {
        @Override
        public JPushMessageObj createFromParcel(Parcel source) {
            return new JPushMessageObj(source);
        }

        @Override
        public JPushMessageObj[] newArray(int size) {
            return new JPushMessageObj[size];
        }
    };

    @Override
    public String toString() {
        return "JPushMessageObj{" +
                "id='" + id + '\'' +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", type='" + type + '\'' +
                '}';
    }
}
